class Pagination {
    props = {
        defaultCurrent: Number,
        current: Number,
        total: Number,
        defaultPageSize: Number,
        pageSize: Number,
    };

    state = {
        current: this.props.current || this.props.defaultCurrent || 1,
        pageSize: this.props.pageSize || this.props.defaultPageSize || 10,
        pageNum: Array(Math.ceil(this.props.total / (this.props.pageSize || this.props.defaultPageSize || 10)))
            .fill(0)
            .map((v, i) => i + 1),
    };

    handleClick(value) {
        this.state.current = value;
    }
}
